<?php

declare(strict_types=1);

namespace app\controller;

use app\BaseController;
use think\facade\Session;

class Auth extends BaseController
{
    /**
     * 用户退出登录 (AJAX 接口)
     *
     * @return \think\Response
     */
    public function logout()
    {
        Session::clear();

        $this->flash('您已成功退出登录。');

        return redirect('/');
    }
}
